# 作用：写一个换行符到stdout
.include "linux.s"

.globl write_newline
.type write_newline, @function

.section .data
newline:
    .asciz "\n"

.section .text
.equ ST_FILEDES, 16
write_newline:
    push    %rbp
    mov     %rsp, %rbp

    mov     $SYS_WRITE, %rax
    mov     ST_FILEDES(%rbp), %rbx
    mov     $newline, %rcx
    mov     $2, %rdx
    int     $LINUX_SYSCALL

    mov     %rbp, %rsp
    pop     %rbp
    ret
